<!--
  ~ Copyright (C) 2010 Brockmann Consult GmbH (info@brockmann-consult.de)
  ~
  ~ This program is free software; you can redistribute it and/or modify it
  ~ under the terms of the GNU General Public License as published by the Free
  ~ Software Foundation; either version 3 of the License, or (at your option)
  ~ any later version.
  ~ This program is distributed in the hope that it will be useful, but WITHOUT
  ~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  ~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  ~ more details.
  ~
  ~ You should have received a copy of the GNU General Public License along
  ~ with this program; if not, see http://www.gnu.org/licenses/
  -->

<html>
<head>
    <title>Sentinel Toolbox Help - Band Maths</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link rel="stylesheet" href="../style.css">
</head>

<body>
<table class="header">
    <tr class="header">
        <td class="header">&nbsp;
            Band Maths
        </td>

        <td class="header" align="right"><a href="../general/overview/SnapOverview.html"><img src="../images/snap_header.jpg"
                                                                                     border=0></a></td>
    </tr>
</table>


<h3>Band Maths</h3>

<p>The band maths tool is used to create new image sample values derived
    from existing bands, tie-point grids and flags. The source data can originate
    from all currently open and spatially compatible input products. The source
    data is combined by arbitrary mathematical expression to generate the target data. By
    default, a new image view is automatically opened for the new sample values.
    You can disable this behaviour in the preferences dialog.</p>

<p>Please refer to the
    <a href="ExpressionEditor.html">Maths Expression Editor</a> documentation for the syntax and capabilities of
    band maths expressions.</p>

<p>After the new band has been created (or an existing has been overwritten), you can change to the
    <a href="ProductExplorer.html">Product Explorer</a> in order to open an image view in
    order to inspect the resulting samples.</p>

<p align="center"><img border="0" src="images/BandMaths.png"></p>

<h4>Parameter</h4>

<p class="i1"><a name="targetProduct"><b>Target Product:</b></a><br>
    Select the target product where the new band will be added.
</p>

<p class="i1">
    <b>Name:</b><br>
    Specifies the name of the new band. The name must not be empty and the target product must not contain a
    band with the same name.
</p>

<p class="i1">
    <b>Description:</b><br>
    An optional description can be entered here.
</p>

<p class="i1">
    <b>Unit:</b><br>
    An optional unit can be entered here.
</p>

<p class="i1">
    <b>Spectral Wavelength:</b><br>
    An optional spectral wavelength may be provided in order to visualize
    the new band in the <a href="SpectrumWindow.html">Spectrum View</a>.
</p>

<p class="i1">
    <b>Virtual (save expression only, don't store data)</b><br>
    If the option is checked a virtual band is created.
    This means that only the expression is stored and the data is re-computed if needed.
    If this option is unchecked, the data is computed once and stored in the product.
</p>

<p class="i1">
    <b>Replace NaN and infinity results by</b><br>
    Sometimes an expression can result to a NaN (Not a Number)or infinity value, in these
    cases these values will be replaced by the value specified here. This value will also be used
    as the no-data value of the band.
</p>

<p class="i1"><b>Expression:</b><br>
    This field takes the maths expression which is used to create new data
    samples. Please refer to the <a href="ExpressionEditor.html">Maths Expression Editor</a>
    documentation for the syntax and capabilities of expressions.

<p class="i1">
    <b>Edit Expression...</b><br>
    Opens the <a href="ExpressionEditor.html">Maths Expression Editor</a> which provides a
    a convenient way to create valid band maths expressions.
</p>

<p class="inote">
    <b>Note:</b> If you create a virtual band and reference multiple products within your expression,
    you should consider to store your current <a href="Session.html">Session</a> in order to keep all the references
    valid.
    Otherwise it might happen that the expression can not be parsed anymore, because the referenced
    products can not be found.
</p>


<h4>OK, Cancel and Help</h4>

<p class="i1">
    <b>OK</b><br>
    Computes the new sample data and closes the dialog. Refer to the preferences dialog for an option to
    specify whether or not to automatically open an image view for the new data samples.
</p>

<p class="i1">
    <b>Cancel</b><br>
    Closes the dialogue and all changes are reverted.
</p>

<p class="i1">
    <b>Help</b><br>
    Opens this help page.
</p>

<hr>
</body>
</html>